
function getLocation()
  {
  if (navigator.geolocation)
    {
    	navigator.geolocation.getCurrentPosition(showPosition,error);
    }else{
    	alert('Geolocation is not supported by this browser.');
	  }
  }
function showPosition(position)
  {
  location.href='ServletGeoLocation?latlng='+position.coords.latitude+","+position.coords.longitude+
		  "&page="+document.URL;
  }
function error(err)
  {
	 if (err.code == 0) {
         alert("Oops! Something has gone wrong");
       }
       if (err.code == 1) {
         alert("Oops! You didn't accept share your position");
       }
       if (err.code == 2) {
         alert("Oops! Is impossible acquire your current position");
       }
       if (err.code == 3) {
         alert("Oops! The timeout has finished");
       }
  }